"------Netrw's configurations ----------------------------------------------
if ! exists("g:loaded_netrwPlugin")
  finish
endif

let g:netrw_banner=0
let g:netrw_keepdir=0
let g:netrw_sizestyle="H"
let g:netrw_timefmt="%y/%m/%d|%W-%u %H:%M:%S %z"
" Hide dotfiles on load, toggle it with press key a
let g:netrw_list_hide='\(^\|\s\s\)\zs\.\S\+'
let g:netrw_localcopydircmd = 'cp -r'

" Better keymaps for Netrw
function! NetrwMapping()
  " Create a file
  nmap <buffer> f %:w<CR>
  " Fast quit
  nmap <buffer> <silent> <nowait> q :bd<CR>
  " Fast mark
  nmap <buffer> <TAB> mf
  " For bookmark
  nmap <buffer> bb mb
  nmap <buffer> bd mB
endfunction

augroup netrw_mapping
    au!
    au filetype netrw call NetrwMapping()
augroup END

nnoremap <leader>t :Explore<CR>
